How to: Install Docker on Ubuntu Desktop

您所在的位置:网站首页 install docker engine on ubuntu How to: Install Docker on Ubuntu Desktop

How to: Install Docker on Ubuntu Desktop

2022-06-04 16:56| 来源: 网络整理| 查看: 265

This how to guide is based on an聽install聽of Docker on聽Ubuntu Desktop 16.04.1. To follow along, please download and install this first.

This blog post is really just a brain dump\illustration of the steps detailed in this article: https://docs.docker.com/engine/installation/linux/ubuntulinux/.聽There are multiple ways to install Docker on Ubuntu. Also, if you are using a different Linux flavor such as Debian, Fedora etc. the steps may vary a little.

Login to Ubuntu.

Open up the Terminal.

step1

Enter:聽sudo apt-get update and hit enter.

step2

You will get prompted for your password in order to run with sudo. You will get prompted for your credentials multiple times during this process.

step3

Enter sudo apt-get install apt-transport-https ca-certificates and hit enter.

step5

Enter sudo apt-key adv –keyserver hkp://p80.pool.sks-keyservers.net:80 –recv-keys 58118E89F3A912897C070ADBF76221572C52609D

step7

Navigate to the sources.list.d folder under etc\apt (You can find this by going to Files–>Computer), right click and click Open in Terminal.

step8

 

Enter sudo nano and click enter.

step9

Enter deb https://apt.dockerproject.org/repo ubuntu-xenial main and press ctrl+X and save as docker.list.

step10

The docker.list file should have been created.

step11

Enter sudo apt-get update and hit enter.

step13

 

Enter sudo apt-get purge lxc-docker and hit enter.

step14

Enter apt-cache policy docker-engine and hit enter.

step15

Enter sudo apt-get update again and hit enter.

step16

 

Enter sudo apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual and hit enter. When prompted, enter Y to continue.

step18

 

Once again, enter sudo apt-get update and hit enter.

step19

 

Enter sudo apt-get install docker-engine and hit enter. When prompted, enter Y to continue. Congrats, Docker should now be installed successfully. Let’s make sure!

step21

 

Enter sudo service docker start and hit enter to start the docker service.

Enter sudo docker run hello-world and hit enter.

step22

 

It should pull and run a simple sample Docker container as above.

I strongly advise you to install Docker Compose to build containers using other peoples projects. You can install Compose by browsing to: https://github.com/docker/compose/releases and copy the commands. Grab the commands for the latest release.

step2

 

In the terminal, enter sudo -i and then paste in the commands. You can verify the install by entering docker-compose –version.

To configure different options, review this article:聽https://docs.docker.com/engine/installation/linux/ubuntulinux/聽for things like ensuring docker runs on startup.



【本文地址】


今日新闻


推荐新闻


    CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3